/**
*  Copyright 2002 Sun Microsystems, Inc. All rights reserved.
*/

/**
 *Title Vehicle
 * @author xiaofei
 *@version 1.0
 */
package vehicle;
public class Vehicle {
	protected String licensePlateNumber;
	protected int speed;
	protected double load;
	public Vehicle()
	{
		this.licensePlateNumber = "xxx1234";
		this.speed = 100;
		this.load = 100.0;
	}
	public Vehicle(String licensePlateNumber, int speed, double load)
	{
		this.licensePlateNumber = licensePlateNumber;
		this.speed = speed;
		this.load = load;
	}
	public void accelerate()
	{
		this.speed++;
	}
	public void decelerate()
	{
		this.speed--;
	}
	public void setLicensePlateNumber(String licensePlateNumber)
	{
		this.licensePlateNumber = licensePlateNumber;
	}
	public double getLoad()
	{
		return this.load;
	}
	public String toString()
	{
		return "This vehicle's license plate number is " + this.licensePlateNumber + " and speed is "
				+ this.speed + " and load is " + this.load ;
	}
}
